<template>
	<view class="btn" :style="{'margin-top': marginTop + 'rpx', 'width': width + 'rpx'}" @click="onBtnClick">{{text}}</view>
</template>

<script>
	export default{
		props: {
			text: String,
			marginTop: {
				type: Number,
				default: 0
			},
			width: {
				type: Number,
				default: 480
			}
		},
		methods: {
			onBtnClick() {
				this.$emit('onBtnClick')
			}
		}
	}
</script>

<style scoped>
	.btn{
		height: 68rpx;
		background: #3791E9;
		border-radius: 8rpx;
		text-align: center;
		line-height: 68rpx;
		margin: 0 auto;
		color: #fff;
	}
</style>
